<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator"%>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/page" prefix="page"%>

<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"  %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"  %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"  %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"  %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"  %>


	<link rel="stylesheet" type="text/css" href="/ouif/hrBar/hrBar.css" id="stylesheet" />
	<script type="text/javascript" src="/ouif/hrBar/hrBar.js"></script>
	
	<script type="text/javascript">
		$(document).ready(function() {
			
			// 회원가입
			$("#id_href_member_register").click(function() {
				location.href = '/member/add';
			});

			// 로그인
			$("#id_href_login").click(function() {
				location.href = '/member/login';
			});
			
			// 개인정보
			$("#id_href_member_info").click(function() {
				<sec:authorize ifAllGranted="ROLE_USER">
				location.href = '/member/view/<sec:authentication property="principal.username"/>';
				</sec:authorize>
			});

			// 로그아웃
			$("#id_href_logout").click(function() {
				location.href = '/system_logout';
			});
		});
	</script>
		
		
	<div id="pre_header">
		<h1>
			<a href="/"><img src="/img/h_title2.gif"></a>
			<span class="beta"><img src="/img/beta_icon.png" width=55></span>
		</h1>
		
		<div class="group">
			<div class="log">
				<sec:authorize ifAllGranted="ROLE_ADMIN">
					<span id="id_admin_tag"><font color="red"><b>[<sec:authentication property="principal.user.roleGrpNm"/>]</b></font></span>
				</sec:authorize>
				
				<sec:authorize ifNotGranted="ROLE_USER">
					<a id="id_href_member_register" href="#" class="btn_xsml"><span>회원가입</span></a>
					<a id="id_href_login" href="#" class="btn_xsml"><span>로그인</span></a>					
				</sec:authorize>
				
				<sec:authorize ifAnyGranted="ROLE_USER">
					<span><sec:authentication property="principal.user.name"/>(<sec:authentication property="principal.username"/>) 님,</span>				
					<span class="team"><sec:authentication property="principal.user.nickname"/></span>
					<a id="id_href_member_info" href="#" class="btn_xsml"><span>개인정보</span></a>
					
					<a id="id_href_logout" href="#" class="btn_xsml"><span>로그아웃</span></a>
				</sec:authorize>
			</div>
			<div class="services">
				<span><a href="javascript:alert('HELP');">Help</a></span>
				<span><a href="javascript:alert('FAQ');">FAQ</a></span>
				<span><a href="javascript:alert('장애신고');">사이트버그</a></span>
			</div>
		</div>	
	</div>
	




	
	<div id="menu" class="menu mcViolet">
	<!-- class="mcPurple | mcViolet | mcOrange | mcGreen | mcGray"-->
		<div class="inset">
			<div class="major">
			<!-- class="major + (m1~m12)"-->
				<ul>
					<li class="m1"><a href="/intro/welcome"><span>자바카페</span></a>
						<div class="sub">
							<ul>
								<li><a href="/intro/welcome"><span>카페소개</span></a></li>
								<li><a href="/intro/people"><span>카페사람들</span></a></li>
								<li><a href="/intro/history"><span>카페연혁</span></a></li>
								<li><a href="/intro/regulation"><span>회칙</span></a></li>
								<li><a href="/intro/site"><span>관련사이트</span></a></li>
							</ul>
						</div>
				 	
					</li>
					<li class="m2"><a href="/board/list/BBS_ID/NTC_001"><span>공지사항</span></a>
						<div class="sub">
							<ul>
								<li><a href="/board/list/BBS_ID/NTC_001"><span>공지사항</span></a></li>
							</ul>
						</div>
					</li>
					<li class="m3"><a href="/board/list/BBS_ID/BLG_001"><span>자바소식</span></a>
						<div class="sub">
							<ul>
								<li><a href="/board/list/BBS_ID/BLG_001"><span>자바뉴스</span></a></li>
								<li><a href="/board/list/BBS_ID/BLG_002"><span>IT뉴스</span></a></li>
								<li><a href="/board/list/BBS_ID/BLG_003"><span>세미나</span></a></li>
								<li><a href="/board/list/BBS_ID/BLG_004"><span>도서리뷰</span></a></li>
							</ul>
						</div>
					</li>
					<li class="m4"><a href="/community/home"><span>스터디팀</span></a>
						<div class="sub">
							<ul>
								<li><a href="/community/home"><span>회원모집</span></a></li>
							</ul>
						</div>
					</li>
					<li class="m5"><a href="/board/list/BBS_ID/QNA_002"><span>강좌</span></a>
						<div class="sub">
							<ul>
								<li><a href="/board/list/BBS_ID/QNA_002"><span>설치 강좌</span></a></li>
								<li><a href="/board/list/BBS_ID/QNA_003"><span>UI 강좌</span></a></li>
								<li><a href="/board/list/BBS_ID/QNA_004"><span>JAVA 강좌</span></a></li>
							</ul>
						</div>
					</li>
					
					<sec:authorize ifAllGranted="ROLE_ADMIN">
					<li class="m6"><a href="/board/list/BBS_ID/QNA_001"><span>운영진 게시판</span></a>
					</li>
					<li class="m7"><a href="/manage/memberRole/list"><span>카페관리</span></a>
						<div class="sub">
							<ul>
								<li><a href="/manage/memberRole/list"><span>회원 관리</span></a></li>
								<li><a href="/manage/managerInfo/list"><span>운영진 관리</span></a></li>
								<li><a href="/manage/welcome"><span>카페 관리</span></a></li>
							</ul>
						</div>
					</li>
					</sec:authorize>
					
				</ul>
			</div>
			<div class="aside">
				<ul>
					<li class="m1"><a href="#"><b><span id="id_div_today" class="today"></span></b></a></li>
				</ul>
			</div>
			<span class="gradient"></span>
		</div>
		<span class="shadow"></span>
	</div>
	
	<script type="text/javascript">
		var d = new Date();
		var week = new Array('<spring:message code="disc.week.1"/>','<spring:message code="disc.week.2"/>','<spring:message code="disc.week.3"/>','<spring:message code="disc.week.4"/>','<spring:message code="disc.week.5"/>','<spring:message code="disc.week.6"/>','<spring:message code="disc.week.7"/>');
		document.getElementById("id_div_today").innerHTML = d.getFullYear() + '-' + (d.getMonth()+1) + '-' + d.getDate() + ' [' + week[d.getDay()] + ']';
	</script>
	
	
	
	
	
	
	
	
	
	
	